wayland: Use effective toplevel as popup parent
authorJonas Ådahl <jadahl@gmail.com>
Thu, 4 Aug 2016 06:05:06 +0000 (14:05 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 18 Aug 2016 08:51:46 +0000 (04:51 -0400)
When using the set transient-for as a popup parent, fetch the effective
toplevel instead, otherwise we will position against the wrong
coordinate.

https://bugzilla.gnome.org/show_bug.cgi?id=769402

gdk/wayland/gdkwindow-wayland.c

index e06f39654d09a1c83ab0f84d3d5a787027da3dd9..51a7b02dc1ab38dd3e1e561c5f54029ee749c0a6 100644 (file)
@@ -1706,7 +1706,10 @@ gdk_wayland_window_map (GdkWindow *window)
                                             &window->x, &window->y, NULL);
         }
       else
-        transient_for = get_popup_parent (impl->transient_for);
+        {
+          transient_for = gdk_window_get_effective_toplevel (impl->transient_for);
+          transient_for = get_popup_parent (transient_for);
+        }
 
       if (!transient_for)
         {